<?= $this->fetch('titre'); ?>

<?= $this->fetch('content'); ?> <!--On récupère le contenu des autres pages.ctp-->

<?php $this->start('menu_gauche'); ?>

<?php if(isset($country)){ ?>

<div class="navbar navbar-default">
    <ul id="demo2" class="nav">
        <li class="active"><a href="#"><?php echo $country['Country']['name']; ?></a></li>

        <?php foreach ($country['MenuCategory'] as $menu): ?>
        <li><a href="#"><?php echo $menu['name']; ?></span></a>

            <?php if(!empty($menu['MenuSousCategory'])){ ?>
            <ul>
                <?php foreach ($menu['MenuSousCategory'] as $sous_menu): ?>

                <?php echo $this->Html->link($sous_menu['name'], array(
                    'controller' => 'countries', 
                    'action' => 'articles',
                    'id_country' => $country['Country']['id'],
                    'id_sous_menu' => $sous_menu['id']
                    )); ?>
                <?php endforeach; ?>
            </ul>
            <?php } ?>
        </li>
    <?php endforeach; ?>
</ul>
</div>

<?php } ?>

<?php $this->end(); ?>

<?php $this->start('actions'); ?>
<div class="actions">
	<h3><?php echo __('Actions'); ?></h3>
	<ul>

		<li><?php echo $this->Html->link(__('List Countries'), array('action' => 'index')); ?></li>
		<li><?php echo $this->Html->link(__('List Continents'), array('controller' => 'continents', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Continent'), array('controller' => 'continents', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Currencies'), array('controller' => 'currencies', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Currency'), array('controller' => 'currencies', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Types Regions'), array('controller' => 'types_regions', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Types Region'), array('controller' => 'types_regions', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Menu Categories'), array('controller' => 'menu_categories', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Menu Category'), array('controller' => 'menu_categories', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Regions'), array('controller' => 'regions', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Region'), array('controller' => 'regions', 'action' => 'add')); ?> </li>
	</ul>
</div>
<?php $this->end(); ?>




